
        package com.example.demoss.util;

import lombok.Getter;

import java.util.HashMap;
import java.util.Map;

/**
 * @author 黄靖
 * @author 2022-11-30 18:25
 * description:
 **/
@Getter
public class AqiDictionaryUtil {

    public static   Map<Integer,Integer>  so2Map = new HashMap();

    public static Map<Integer,Integer>  no2Map = new HashMap();

    public  static Map<Integer,Integer>  coMap = new HashMap();

    public  static Map<Integer,Integer>  o3Map = new HashMap();

    public   static Map<Integer,Integer>  pm2_5Map = new HashMap();
    static {

        /*
         * aqi,指数
         * */
        so2Map.put(0,0);
        so2Map.put(50,50);
        so2Map.put(100,150);
        so2Map.put(150,475);
        so2Map.put(200,800);
        so2Map.put(300,1600);
        so2Map.put(400,2100);
        so2Map.put(500,2620);
        /*
         * aqi,指数
         * */
        no2Map.put(0,0);
        no2Map.put(50,40);
        no2Map.put(100,80);
        no2Map.put(150,180);
        no2Map.put(200,280);
        no2Map.put(300,565);
        no2Map.put(400,750);
        no2Map.put(500,940);
        /*
         * aqi,指数
         * */
        coMap.put(0,0);
        coMap.put(50,2);
        coMap.put(100,4);
        coMap.put(150,14);
        coMap.put(200,24);
        coMap.put(300,36);
        coMap.put(400,48);
        coMap.put(500,60);
        /*
         * aqi,指数  8小时
         * */
        o3Map.put(0,0);
        o3Map.put(50,100);
        o3Map.put(100,160);
        o3Map.put(150,215);
        o3Map.put(200,265);
        o3Map.put(300,800);
        //不做计算
        o3Map.put(400,250);
        o3Map.put(500,250);
        /*
         * aqi,指数
         * */
        pm2_5Map.put(0,0);
        pm2_5Map.put(50,35);
        pm2_5Map.put(100,75);
        pm2_5Map.put(150,115);
        pm2_5Map.put(200,150);
        pm2_5Map.put(300,250);
        pm2_5Map.put(400,350);
        pm2_5Map.put(500,500);

    }








    /*
        ONE(0,0),
        TWO(50,40),
        THREE(100,80),
        FOUR(150,180),
        FIVE(200,280),
        SIX(300,565),
        SEVEN(400,750),
        EIGHT(500,940)

    ;*/
    private double aqi;
    private double correspond;

    AqiDictionaryUtil(double aqi, double correspond) {
        this.aqi = aqi;
        this.correspond = correspond;
    }
}

